package com.tanhua.model.vo;


import com.tanhua.model.domain.UserInfo;
import com.tanhua.model.mongo.UserLike;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 用户喜欢VO
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserLovesVo {

    private String id;  //喜欢用户的id
    private String avatar;  //用户头像
    private String nickname;  //用户昵称
    private String createDate;  //时间

    public static UserLovesVo init(UserInfo userInfo){
        UserLovesVo vo = new UserLovesVo();
        if (userInfo != null){
            BeanUtils.copyProperties(userInfo,vo);
        }
        return vo;
    }
}
